<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="en">
<%@ include file="common/head.jsp"%>
<body class="fix-header fix-sidebar">


	<div class="preloader">
		<svg class="circular" viewBox="25 25 50 50">
				<circle class="path" cx="50" cy="50" r="20" fill="none"
				stroke-width="2" stroke-miterlimit="10" /> </svg>
	</div>

	<div id="main-wrapper">
		<!-- header header  -->
		<%@ include file="common/header.jsp"%>
		<!-- End header header -->
		<!-- Left Sidebar  -->
		<%@ include file="common/nav.jsp"%>
		<!-- End Left Sidebar  -->
		<div class="page-wrapper" style="min-height: 382px;">
			<!-- 锐高软件 -->
			<%@ include file="../common/ruigao.jsp"%>

			<div class="container-fluid">
				<!-- Start Page Content -->
				<div class="row">
					<div class="col-12">
						<div class="card">
							<div class="card-body">
								<div role="toolbar">
									<div class="inbox-leftbar">
										<a class="btn btn-danger btn-block waves-effect waves-light"
											href="${pageContext.request.contextPath}/indexServlet"> <font
											style="vertical-align: inherit;"> <font
												style="vertical-align: inherit;">返回首页</font>
										</font>
										</a>

									</div>
									<div class="btn-group">
										<button class="btn btn-light waves-effect" type="button">
											<i class="mdi mdi-archive font-18 vertical-middle"></i>
										</button>
										<button class="btn btn-light waves-effect" type="button">
											<i class="mdi mdi-alert-octagon font-18 vertical-middle"></i>
										</button>
										<button class="btn btn-light waves-effect" type="button">
											<i class="mdi mdi-delete-variant font-18 vertical-middle"></i>
										</button>
									</div>



								</div>

								<input type="hidden" name="userid" id="userid" value="${userid}">

								<div class="table-responsive m-t-40">
									<div id="example23_wrapper" class="dataTables_wrapper">

										

										<table id="example23"
											class="display nowrap table table-hover table-striped table-bordered dataTable"
											cellspacing="0" width="100%" role="grid"
											aria-describedby="example23_info" style="width: 100%;">
											<thead>
												<tr role="row">
													<th class="sorting_asc" tabindex="0"
														aria-controls="example23" rowspan="1" colspan="1"
														aria-sort="ascending"
														aria-label="Name: activate to sort column descending"
														style="width: 108.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">姓名</font></font></th>
													<th class="sorting" tabindex="0" aria-controls="example23"
														rowspan="1" colspan="1"
														aria-label="Position: activate to sort column ascending"
														style="width: 158.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">所属公司</font></font></th>
													<th class="sorting" tabindex="0" aria-controls="example23"
														rowspan="1" colspan="1"
														aria-label="Office: activate to sort column ascending"
														style="width: 48.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">部门</font></font></th>
													<th class="sorting" tabindex="0" aria-controls="example23"
														rowspan="1" colspan="1"
														aria-label="Age: activate to sort column ascending"
														style="width: 37.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">职位</font></font></th>
													<th class="sorting" tabindex="0" aria-controls="example23"
														rowspan="1" colspan="1"
														aria-label="Start date: activate to sort column ascending"
														style="width: 86.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">上班时间</font></font></th>
													<th class="sorting" tabindex="0" aria-controls="example23"
														rowspan="1" colspan="1"
														aria-label="Salary: activate to sort column ascending"
														style="width: 71.4px;"><font
														style="vertical-align: inherit;"><font
															style="vertical-align: inherit;">下班时间</font></font></th>
												</tr>
											</thead>

											<tbody>
												<!-- 根据servlet传到的数据进行循环遍历 -->
												<c:forEach var="items" items="${pageInfo.getPageList()}">

													<tr role="row" class="odd">
														<td class="sorting_1"><c:forEach var="user"
																items="${UserIdList}">
																<font style="vertical-align: inherit;"> <font
																	style="vertical-align: inherit;"> <c:if
																			test="${items.userId eq user.userId}">
															 ${user.userName}
															</c:if>
																</font></font>
															</c:forEach></td>


														<td><c:forEach var="company" items="${CompanyList}">

																<font style="vertical-align: inherit;"> <font
																	style="vertical-align: inherit;"> <c:if
																			test="${items.companyId eq company.companyId}">
															 ${company.companyName}
															</c:if>

																</font>
																</font>
															</c:forEach></td>



														<td><font style="vertical-align: inherit;"> <font
																style="vertical-align: inherit;"> <c:forEach
																		var="deptimp" items="${DeptimplList}">

																		<c:if test="${items.deptId eq deptimp.deptId}">
															 ${deptimp.deptName}
													</c:if>
																	</c:forEach>
															</font>
														</font></td>


														<td><c:forEach var="user" items="${UserIdList}">

																<font style="vertical-align: inherit;"> <font
																	style="vertical-align: inherit;"> <c:if
																			test="${items.userId eq user.userId}">
															 ${user.userPosition}
												    </c:if>
																</font>
																</font>
															</c:forEach></td>


														<td><font style="vertical-align: inherit;"> <font
																style="vertical-align: inherit;"> <fmt:formatDate
																		type="both" value="${items.attendanceStarttime }"
																		pattern="yyyy-MM-dd HH:mm:ss" />
															</font>
														</font></td>
														<td><font style="vertical-align: inherit;"> <font
																style="vertical-align: inherit;"> <fmt:formatDate
																		type="both" value="${items.attendanceEndtime}"
																		pattern="yyyy-MM-dd HH:mm:ss" />
															</font></font></td>

													</tr>
												</c:forEach>

											</tbody>
										</table>

										<div class="dataTables_paginate paging_simple_numbers"
											id="example23_paginate">
											<a		href="?PageNo=1"
													class="paginate_button" aria-controls="example23"
													data-dt-idx="7" tabindex="0" id="example23"> <font
													style="vertical-align: inherit;"> <font
														style="vertical-align: inherit;"></font>首页</font>
											</a>
											
											<c:if test="${pageInfo.getHasPrevPage()}">
											<a		href="?PageNo=${pageInfo.getPrevPage()}"
													class="paginate_button" aria-controls="example23"
													data-dt-idx="7" tabindex="0" id="example23"> <font
													style="vertical-align: inherit;"> <font
														style="vertical-align: inherit;"></font>上一页</font>
											</a>
												
											</c:if>
											<span> <c:forEach items="${pageInfo.groupPage }"
													 var="pageI">
													<a
													href="?PageNo=${pageI}"
													class="paginate_button" aria-controls="example23"
													data-dt-idx="7" tabindex="0" id="example23"> <font
													style="vertical-align: inherit;"> <font
														style="vertical-align: inherit;">${pageI }</font></font>
												</a>
												</c:forEach>
											</span>



											<c:if test="${pageInfo.getHasNextPage()}">
												<a
													href="?PageNo=${pageInfo.getNextPage()}"
													class="paginate_button next" aria-controls="example23"
													data-dt-idx="7" tabindex="0" id="example23_next"> <font
													style="vertical-align: inherit;"> <font
														style="vertical-align: inherit;">下一页</font></font>
												</a>
											</c:if>
											<a		href="?PageNo=${pageInfo.totalPage}"
													class="paginate_button" aria-controls="example23"
													data-dt-idx="7" tabindex="0" id="example23"> <font
													style="vertical-align: inherit;"> <font
														style="vertical-align: inherit;"></font>末页</font>
											</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>

		</div>
		<!-- End Container fluid  -->



	</div>
	<!-- End Container fluid  -->
	<!-- footer -->
	<%@ include file="common/footer.jsp"%>
	<!-- End footer -->
	<!-- End Page wrapper  -->
	<%@ include file="common/js.jsp"%>

	<!-- End Page wrapper  -->




</body>
</html>